﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" x:Class="FlickrSample.View.Photo.PhotoSetView"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
	<UserControl.Resources>
		<ItemsPanelTemplate x:Key="WrappingListBox">
			<toolkit:WrapPanel Width="480"/>
		</ItemsPanelTemplate>
	</UserControl.Resources>
    
    <Grid x:Name="LayoutRoot">
        <Image Source="{Binding DefaultInstance.Source}" Stretch="UniformToFill" Opacity=".15"/>
        <ListBox SelectedItem="{Binding SelectedItem, Mode=TwoWay}" ItemsSource="{Binding Instances}" Style="{StaticResource NiceListBox}" Background="{x:Null}" ItemsPanel="{StaticResource WrappingListBox}">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid Width="75" Height="75">
                        <Image Source="{Binding Instance.Source}"/>
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</UserControl>
